﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace TestFloatable
{
    public partial class MainPage : UserControl
    {
        public MainPage()
        {
            InitializeComponent();
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            FloatControl.ShowandHideWindow(true);
        }

        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            FloatControl1.ShowandHideWindow(true);
        }

        private void Button_Click_2(object sender, RoutedEventArgs e)
        {
            //FloatControl2.VerticalOffset = 60;
            //FloatControl2.HorizontalOffset = 60;
            //FloatControl2.ParentLayoutRoot = FloatPanel;
            //FloatControl2.Show();
            //FloatControl2.Margin = new Thickness(0, 60, 400, 0);
            //FloatControl2.Title = FloatControl2.Margin.ToString();

            if (FloatControl2.ParentLayoutRoot == null)
            {
                FloatControl2.ParentLayoutRoot = FloatPanel;
                FloatControl2.Show();
            }

            FloatControl2.Visibility = System.Windows.Visibility.Visible;
        }
    }
}
